<template>
	<view class="content z-flex z-flex-align-c pt100" style="flex-direction: column;">
		<view>
			<template v-if="option.type == 'success'">
				<u-icon name="checkmark-circle-fill" color="#19be6b" size="140"></u-icon>
			</template>
			<template v-else>
				<u-icon name="close-circle-fill" color="#fa3534" size="140"></u-icon>
			</template>
		</view>
		<view class="mt20 fwb c-666">{{option.type == 'success'?'核销成功':'核销失败'}}</view>
		<view v-if="option.type == 'fail'" class="c-999 mt30 fs24">该二维码不可在当前门店使用，请切换对应的门店重新扫码</view>
		<view class="mt100"></view>
		<u-button plain size="medium" @click="handBack">返回门店</u-button>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				option: {
					type: 'success'
				}
			}
		},
		onLoad(option) {
			option && (this.option = option)
		},
		methods:{
			handBack(){
				uni.$u.route({
					type: 'navigateBack'
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.content{
		width: 100vw;
	}
</style>
